// pages/component/navTop/index.js

//获取应用实例
const app = getApp()

Component({
  options: {
    multipleSlots: true //开启slot支持
  },
  properties: {
    //顶部容器样式
    navStyle: {
      type: String,
      value: ''
    },
    //标题名称
    title: {
      type: String,
      value: ''
    },
    //标题样式
    titleStyle: {
      type: String,
      value: ''
    },
    //是否有返回按钮
    isBackBtn: {
      type: Boolean,
      value: false
    },
    //返回按钮颜色
    backBtnColor: {
      type: String,
      value: 'rgba(0,0,0,.9)'
    }
  },
  data: {
    navBarHeight: app.globalData.navBarHeight,
    navBarTop: app.globalData.navBarTop,
    navBarBackTop: app.globalData.navBarBackTop,
  },
  lifetimes: {},
  methods: {
    //返回
    _back() {
      wx.navigateBack({
        delta: 1
      })
    }
  }
})